home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / RFR002.QM < prev    next >
Text File  |  1991-08-26  |  15KB  |  326 lines

  1. *                               RFR002.QM
  2. *                        Written By Tom Hogshead
  3. *                       [ See RFRMxx.QM For Use ]
  4. *                                8/8/91
  5. *  Key       Subfile                       Description
  6. * =====  ===============  ====================================================
  7. * @(3)                    Capitalize First Letter of all Words in COLUMN Block
  8. * @(4)                    Capitalize First Letter of all Words in CHARACTER Blk
  9. * @(t)                         (Alternate version of @4 for technique only)
  10. * @(8)                         (Alternate version of @4 for technique only)
  11. * @(5)                    Capitalize First Letter of all Words in LINE Block
  12. * #(f1_)                  Capitalize Word At Cursor
  13. * #(f2_)                  Capitalize First Letter of Word At Cursor
  14. * #(f4_)                  Un-Capitalize Word At Cursor
  15. * @(6)                    Make all Letters in Block LOWER Case
  16. * @(7)                    Make all Letters in Block UPPER Case
  17. *
  18. *          {e:\up\RFRM*}--Return To RFRMxx.QM
  19. *
  20. *-- eoi
  21.  
  22. * 
  23. * ------------------------------------------------------
  24. * #(f1_) Capitalize word at cursor
  25. * ------------------------------------------------------
  26. *
  27. #f1 macrobegin markword upper unmarkblock
  28. *
  29. * 7 bytes Mon  08-20-1990  07:17:53
  30.  
  31. * 
  32. * ----------------------------------------
  33. * #(F2_) Capitalize First Letter of Word
  34. * ----------------------------------------
  35. *
  36. #f2 macrobegin
  37.     markword
  38.     lower                   * |
  39.     gotoblockbeg
  40.     unmarkblock
  41.     markcolumn
  42.     upper
  43.     unmarkblock
  44.     wordright               * |
  45. *
  46. * 10 bytes Sun  03-10-1991  16:05:55
  47. * 12 bytes Thu  08-08-1991  16:36:11 (TH #f2, added lower and wordright
  48.  
  49. * 
  50. *------------------------------------------------------------
  51. * @(3)  Capitalize First Letter of all Words in Column Block
  52. *------------------------------------------------------------
  53.  
  54. * Mark column block, then press @3 to capitalize first letter of every
  55. * word in block.  Unmark when finished if OK.  Block MUST be a column
  56. * block, NOT a line or character block, and need not be closed. This
  57. * macro also unconditionally uppercases the first character of the
  58. * block, so be sure the block includes a full first word.
  59.  
  60. @3     Macrobegin
  61.         AltWordSet                      * For all words
  62.         GotoBlockBeg                    * Test if closed
  63.         JTrue BEG:                      *
  64.         MarkColumn                      * Close if block was started
  65.         gotoblockbeg                    * Test if now closed
  66.         Jfalse END:                     * End macro if no block closed
  67.  BEG:
  68.         Onewindow                       * Close all windows
  69.         Horizontalwindow                * Open window
  70.         editfile "NUL" return           * Load NUL
  71.         copyblock                       * Copy block to NUL
  72.         gotoblockend                    * Position to mark                  |
  73.         #250                            * Mark block end with wierd char    |
  74.         gotoblockbeg                    * Return to block begin             |
  75.         Unmarkblock                     *
  76.  LOOP:                                  *
  77.         Upper                           * Capitalize first letter
  78.         Wordright                       * Move to next word
  79.         Jtrue LOOP:                     * Continue until no more words
  80.  END_LOOP:                              *
  81.         find #250 return "G" return     * Put cursor on wierd char          |
  82.         Cursorleft                      * Position cursor on last char
  83.         MarkColumn                      * Mark column block begin
  84.         Begfile                         * Finish mark
  85.         Copy                            * Copy block to scrap
  86.         Quit                            * Quit NUL
  87.         Prevwindow                      * Return to starting file
  88.         Pasteover                       * Paste back where it was
  89.         Onewindow                       * Close windows
  90.  END:
  91.         DefaultWordSet                  * Reset
  92. *
  93. * 53 bytes Fri  02-22-1991  16:08:43
  94. * 50 bytes Mon  07-15-1991  07:56:46 (TH @3, changed c:! to NUL, shortened)
  95. * 61 bytes Mon  07-15-1991  20:40:59 (TH @3, added windows)
  96. * 63 bytes Mon  07-15-1991  21:16:49 (TH @3, added altwordset)
  97. * 53 bytes Mon  07-15-1991  22:52:27 (TH @3, removed #255)
  98. * 52 bytes Wed  07-17-1991  11:10:41 (TH @3, removed extra unmarkblock)
  99. * 51 bytes Fri  07-19-1991  00:43:20 (TH @3, removed markcolumn)
  100. * 40 bytes Fri  07-19-1991  14:26:26 (TH @3, removed window shrink)
  101. * 51 bytes Tue  07-23-1991  16:14:27 (TH @3, use wierd char to mark NUL |)
  102.  
  103.  
  104. * 
  105. *---------------------------------------------------------------
  106. * @(4)  Capitalize First Letter of all Words in Character Block
  107. *---------------------------------------------------------------
  108.  
  109. * Mark character block, then press @4 to capitalize first letter of
  110. * every word in block.  Unmark when finished if OK.  Block MUST be a
  111. * character block, NOT a column or line block, and need not be closed.
  112. * This macro also unconditionally uppercases the first character of the
  113. * block, so be sure the block includes a full first word.
  114.  
  115. @4 macrobegin
  116.         AltWordSet                      * For all words
  117.         GotoBlockBeg                    * Test if closed
  118.         JTrue BEG:                      *
  119.         DropAnchor                      * Close if block was started
  120.         gotoblockbeg                    * Test if now closed
  121.         Jfalse END:                     * End macro if no block closed
  122.  BEG:
  123.         onewindow horizontalwindow      * Make two windows
  124.         editfile "NUL" return           * Load NUL
  125.         moveblock                       * Move block to NUL
  126.         Unmarkblock                     *
  127.  LOOP:                                  *
  128.         Upper                           * Capitalize first letter
  129.         Wordright                       * Move to next word
  130.         Jtrue LOOP:                     * Continue until no more words
  131.  END_LOOP:                              *
  132.         MarkCharacter                   * Mark character block begin
  133.         Begfile                         * Finish mark
  134.         copy                            * Copy block
  135.         Quit                            * Quit NUL
  136.         Prevwindow                      * Return to starting file
  137.         paste                           * Paste block back where it was
  138.         Onewindow                       * Close windows
  139.  END:                                   * We're done...
  140.         DefaultWordSet                  * Reset
  141. *
  142. * 39 bytes Fri  07-19-1991  14:29:37 (TH @4)
  143.  
  144. * 
  145. * ----------------------------------------------------------------------
  146. * @(t) Capitalize First Letter of all Words in Character Block
  147. *      (Alternate version of @4)
  148. * ----------------------------------------------------------------------
  149.  
  150. * This is an alternate version of @4. I use a block location marker
  151. * #173, move the block to the end of file with a block begin marker
  152. * #174, and move it back where it was when done. It is not as fast as
  153. * @4 and is included here for technique only. This same technique can
  154. * be used for column and line blocks (@3 and @5).
  155.  
  156. @t   Macrobegin
  157.         AltWordSet                      * For all words
  158.         GotoBlockBeg                    * Test if closed
  159.         JTrue BEG:                      *
  160.         DropAnchor                      * Close if block was started
  161.         gotoblockbeg                    * Test if now closed
  162.         Jfalse END:                     * End macro if no block closed
  163.  BEG:
  164.         insertline                      * Insert line on top of block
  165.         #173                            * Insert block location marker
  166.         endfile                         * Go to eof
  167.         addline                         * Add line for block begin marker
  168.         begline                         * Go to bol
  169.         #174                            * Insert block begin marker
  170.         addline                         * Add line for block
  171.         begline                         * Go to bol
  172.         moveblock                       * Move block to eof
  173.         Unmarkblock                     * Unmark to start capitalization
  174.  LOOP:                                  *
  175.         Upper                           * Capitalize first letter
  176.         Wordright                       * Move to next word
  177.         Jtrue LOOP:                     * Capitalize until no more words
  178.         MarkCharacter                   * Start block mark
  179.         Find #174 Return "B" Return     * Find block begin marker
  180.         delline                         * Delete it
  181.         MarkCharacter                   * Close block
  182.         Find #173 Return "G" Return     * Find block location marker
  183.         delline                         * Delete it
  184.         moveblock                       * Move block back where it was
  185.  END:                                   * We're done...
  186.         DefaultWordSet                  * Reset
  187. *
  188. * 51 bytes Fri  07-19-1991  12:11:43 (TH @t)
  189.  
  190. * 
  191. * ----------------------------------------------------------------------
  192. * @(8) Convert Character Block to Initial Capitals
  193. *      (Alternate version of @4)
  194. *      (Written by Tom Hogshead and John Goodman)
  195. * ----------------------------------------------------------------------
  196.  
  197. *     Mark character block, then press @8 to capitalize first letter of
  198. *     every word in block.  Unmark when finished if OK.  Block MUST be
  199. *     a character block, NOT a column or line block, and need not be
  200. *     closed. This macro also unconditionally uppercases the first
  201. *     character of the block, so be sure the block includes a full
  202. *     first word.
  203.  
  204. *     This alternate version uses a technique developed by me with the help
  205. *     of John Goodman.  We move the marked block to the end of the current
  206. *     file, process it, then move it back where it was.  This version is
  207. *     not quite as fast as @4 and is included here for technique only.
  208.  
  209. @8   Macrobegin
  210.         AltWordSet                      * For all words
  211.         GotoBlockBeg                    * Test if closed
  212.         JTrue BEG:                      *
  213.         DropAnchor                      * Close if block was started
  214.         gotoblockbeg                    * Test if now closed
  215.         Jfalse END:                     * End macro if no block closed
  216.  BEG:
  217. *       BegFile InsertLine "* @z " InsertDate InsertTime Gotoblockbeg
  218.         insertline                      * Insert line on top of block
  219.         #173                            * Insert block location marker
  220.         endfile                         * Go to eof
  221.         addline                         * Add line for block begin marker
  222.         begline                         * Go to bol
  223.         #173                            * Insert block begin marker     |
  224. *        addline                         * Add line for block           |a
  225. *        begline                         * Go to bol                    |
  226.         moveblock                       * Move block to eof
  227.         Unmarkblock                     * Unmark to start capitalization
  228.  LOOP:                                  *
  229.         Upper                           * Capitalize first letter
  230.         Wordright                       * Move to next word
  231.         Jtrue LOOP:                     * Capitalize until no more words
  232.         MarkCharacter                   * Start block mark
  233.         Find #173 Return "B" Return     * Find block begin marker
  234. *        delline                         * Delete it                    |a
  235.         MarkCharacter                   * Close block
  236.         DelCh                           * Delete marker character       |
  237.         CursorUp                        * Move up one line              |a
  238.         JoinLine                        * Remove added CR/LF at Eof     |
  239.         RepeatFind                      *                                |b
  240. *         Find Return "G" Return          * Find block location marker   |
  241.         delline                         * Delete it
  242.         moveblock                       * Move block back where it was
  243.  END:                                   * We're done...
  244.         DefaultWordSet                  * Reset
  245. *       BegFile EndLine CursorRight InsertTime
  246. *
  247. * 51 Bytes Fri  07-19-1991  12:11:43 (TH @8)
  248. * 49 Bytes Tue  07-23-1991  22:09:23 (JG @8 Changes |A)
  249. * 45 Bytes Wed  07-24-1991  02:44:09 (TH @8, Substituted Repeatfind |B)
  250.  
  251.  
  252. * 
  253. *------------------------------------------------------------
  254. * @(5)  Capitalize First Letter of all Words in Line Block
  255. *------------------------------------------------------------
  256.  
  257. * Mark Line Block, Then Press @5 To Capitalize First Letter of Every
  258. * Word in Block.  Unmark When Finished If OK.  Block MUST Be A Line
  259. * Block, NOT A Column Or Character Block, And Need Not Be Closed.
  260.  
  261. @5 Macrobegin
  262.         AltWordSet                      * For all Words
  263.         GotoBlockBeg                    * Test If Closed
  264.         JTrue BEG:                      *
  265.         MarkLine                        * Close If Block Was Started
  266.         Gotoblockbeg                    * Test If Now Closed
  267.         Jfalse END:                     * End Macro If No Block Closed
  268.  BEG:
  269.         Onewindow Horizontalwindow      * Make Two Windows
  270.         Editfile "NUL" Return           * Load NUL
  271.         Moveblock                       * Move Block To NUL
  272.         Unmarkblock                     *
  273.  LOOP:                                  *
  274.         Upper                           * Capitalize First Letter
  275.         Wordright                       * Move To Next Word
  276.         Jtrue LOOP:                     * Continue Until No More Words
  277.  END_LOOP:                              *
  278.         Cursorup                        * Needed For Line Blocks
  279.         Markline                        * Mark Line Block Begin
  280.         Begfile                         * Finish Mark
  281.         Copy                            * Copy Block To Scrap
  282.         Quit                            * Quit NUL
  283.         Prevwindow                      * Return To Starting File
  284.         Paste                           * Put Block Back Where It Was
  285.         Onewindow                       * Close Windows
  286.  END:                                   *
  287.         DefaultWordSet                  * Reset
  288. *
  289. * 40 Bytes Fri  07-19-1991  14:25:09 (TH @5)
  290.  
  291.  
  292. * 
  293. * -----------------------------------------
  294. * @(6) Make all Letters in Block LOWER Case
  295. * -----------------------------------------
  296.  
  297. @6 Macrobegin
  298.         Lower
  299. *
  300. * 5 Bytes Tue  07-16-1991  08:58:48 (TH @6)
  301.  
  302. * 
  303. * -----------------------------------------
  304. * @(7) Make all Letters in Block UPPER Case
  305. * -----------------------------------------
  306.  
  307. @6 Macrobegin
  308.         Upper
  309. *
  310. * 5 Bytes Tue  07-16-1991  08:58:48 (TH @6)
  311.  
  312. * 
  313. * ------------------------------------------------------
  314. * #(f4_) Un-capitalize Word At Cursor
  315. * ------------------------------------------------------
  316. *
  317. #f4 Macrobegin Markword Lower Unmarkblock
  318. *
  319. * 7 Bytes Mon  08-20-1990  07:18:07
  320.  
  321. * Macros #f7 And #f8 Were Written By Richard Blackburn of SemWare.
  322. * I Picked Them Up From SemWare Message #317 Intelec Conference 24.
  323. * Comments Are Mine And I Changed Key Assignments From Un-shifted
  324. * To Shifted F7 And F8.
  325.  
  326.